package ast;

import out.Out;
import mem.interfaces.IMem;
import environnement.interfaces.IEnv;
import exceptions.LogoException;
import ast.interfaces.IAST;
import ast.interfaces.IASTexp;

public class ASTexp implements IASTexp{

	public IAST exp;
	
	public ASTexp(IAST exp){
		this.exp = exp;
	}

	@Override
	public Object eval(Out o, IEnv e, IMem m) throws LogoException{
		return getExp().eval(o, e, m);
	}

	@Override
	public String toTreeString(String ident,IEnv env,IMem mem) {
		return "("+ getExp().toTreeString(ident, env, mem) +")";
	}

	public IAST getExp() {
		return exp;
	}

	public void setExp(IAST exp) {
		this.exp = exp;
	}

}
